# coding=utf-8
"""
    flask 配置文件
"""
import os
from typing import Dict, Type

from utils.do_path import LOG_PATH


# @Time    :  2024-10-29 17:12:06
# @Author  :  jiangtong
# @Email   :  gingerqgyy@outlook.com
# @Project :  flask_ocr
# @File    :  config


class Config:
    PORT = 5010
    DEBUG = False
    TESTING = False

    # 日志分割间隔
    INTERVAL = 1
    # 日志保留几份
    BACKUP_COUNT = 7
    # 日志等级
    LOG_LEVEL = 'INFO'
    # 日志路径
    LOG_FILE = os.path.join(LOG_PATH, 'app.log')


class DevConfig(Config):
    PORT = 5010
    DEBUG = True
    TESTING = True
    LOG_LEVEL = 'DEBUG'


class ProdConfig(Config):
    PORT = 5010
    DEBUG = False
    TESTING = False
    LOG_LEVEL = 'INFO'


conf: Dict[str, Type[Config]] = {
    'dev': DevConfig,
    'prod': ProdConfig,
}
